package com.zjj.edu.system.mapper;

import com.zjj.edu.system.domain.SysTenantApplication;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 租户关联系统表
 */
public interface SysTenantApplicationMapper {

    /**
     * 根据租户编码查询子系统关联
     *
     * @param tenantId
     * @return
     */
    public List<SysTenantApplication> getTenantApplicationByTenantId(long tenantId);

    /**
     * 根据租户编码删除子系统关联
     *
     * @param tenantId
     * @return
     */
    public Boolean deleteTenantApplicationByTenantId(@Param("tenantId") long tenantId, @Param("appCode") String appCode);

    /**
     * 添加租户关联子系统
     *
     * @param tenantId
     * @param appCodes
     * @return
     */
    public int batchTenantApplication(@Param("tenantId") long tenantId, @Param("appCodes") List<String> appCodes);

}
